package com.yue.jersey.practice.schedule;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 功能描述: TODO <br/>
 * 创建时间: 2016/12/13<br/>
 *
 * @author QiuYang
 */
@Component
public class PracticeSchedule {

    private static final long INITIAL_DELAY = 1000 * 60;
    private static final long FIXED_DELAY = 1000 * 5;

    @Scheduled(fixedDelay = FIXED_DELAY, initialDelay = INITIAL_DELAY)
    public void scheduleTask(){
        System.out.println("[" + System.currentTimeMillis()/1000 + "] : " + "schedule task");
    }
}
